#!/bin/python3
#-*- coding: utf-8 -*-


nums =[i*100+j*10+k for i in range(1,5) for j in range(1,5) for k in range(1,5) if (i!=j)&(i!=k)&(j!=k) ]
nums1 =[i*100+j*10+k for i in range(1,5) for j in range(1,5) for k in range(1,5) if i!=j and i!=k and j!=k ]
print(nums)
print(nums1)